package com.file;

import java.io.File;

public class Text02 {
    public static void main(String[] args) {
        //删除当前目录下的1.txt-100.txt文件

        for (int i = 1; i <= 100; i++) {
            File file = new File("./text" + i + ".txt");
            file.delete();
        }
        System.out.println("删除成功");
    }
}
